#ifndef CPEDEFINE_H
#define CPEDEFINE_H

enum CpeEmUnlockBandType
{
    CPE_UNLOCKBANDTYPE_CGWLTE = 1,
    CPE_UNLOCKBANDTYPE_LTE = 2,
    CPE_UNLOCKBANDTYPE_NR = 3,
    CPE_UNLOCKBANDTYPE_LTEANDNR = 4,
};

enum CpeEmLoginInputType
{
    CPE_LOGIN_INPUT_IP = 1,
    CPE_LOGIN_INPUT_USER = 2,
    CPE_LOGIN_INPUT_PASSWORD = 3,
};

enum CpeEmBandType
{
    CPE_BANDTYPE_CGW = 1,
    CPE_BANDTYPE_LTE = 2,
    CPE_BANDTYPE_NR = 3,
};

enum CpeEmNRType
{
    CPE_NRTYPE_NULL = -1,
    CPE_NRTYPE_NSA = 0,
    CPE_NRTYPE_SA = 1,
    CPE_NRTYPE_SANSA = 2,
};

enum CpeEmLogType
{
    CPE_LOG_DEBUG = 1,  //调试
    CPE_LOG_INFO = 2,   //信息
    CPE_LOG_WARNING = 3,  //警告
    CPE_LOG_ERROR = 4,  //错误
};

//event handler enum
enum CpeEmZTE
{
    CPE_ZTE_RECOGNIZE = 1,
    CPE_ZTE_GETTOKEN = 2,
    CPE_ZTE_LOGIN_OLD = 3,
    CPE_ZTE_LOGIN_NEW = 4,
    CPE_ZTE_LOGIN_NEWRETURN = 5,
    CPE_ZTE_DEVELOPE = 6,
    CPE_ZTE_DEVELOPE_TOKEN = 7,
    CPE_ZTE_DEVELOPE_LOGIN = 8,
    CPE_ZTE_LOGIN_FAILREASON = 9,
    CPE_ZTE_MODELANDVERSION = 10,
    CPE_ZTE_DATASWITCH = 11,
    CPE_ZTE_RAT = 12,
    CPE_ZTE_BANDLOCK = 13,
    CPE_ZTE_CELLLOCK = 14,
    CPE_ZTE_SIGNAL = 15,
    CPE_ZTE_TEMP = 16,
    CPE_ZTE_TRAFFIC = 17,

    CPE_ZTE_USER_POSTRETURN = 99,
    CPE_ZTE_USER_POSTRETURN2 = 199,
    CPE_ZTE_USER_LOGOUT = 999,
};

//event handler enum
enum CpeEmQWRT
{
    CPE_QWRT_RECOGNIZE = 1,
    CPE_QWRT_GETTOKEN = 2,
    CPE_QWRT_LOGIN_OLD = 3,
    CPE_QWRT_LOGIN_NEW = 4,
    CPE_QWRT_LOGIN_NEWRETURN = 5,
    CPE_QWRT_DEVELOPE = 6,
    CPE_QWRT_DEVELOPE_TOKEN = 7,
    CPE_QWRT_DEVELOPE_LOGIN = 8,
    CPE_QWRT_LOGIN_FAILREASON = 9,
    CPE_QWRT_MODELANDVERSION = 10,
    CPE_QWRT_DATASWITCH = 11,
    CPE_QWRT_RAT = 12,
    CPE_QWRT_BANDLOCK = 13,
    CPE_QWRT_CELLLOCK = 14,
    CPE_QWRT_SIGNAL = 15,
    CPE_QWRT_TEMP = 16,
    CPE_QWRT_TRAFFIC = 17,

    CPE_QWRT_USER_POSTRETURN = 99,
    CPE_QWRT_USER_POSTRETURN2 = 199,
    CPE_QWRT_USER_LOGOUT = 999,
};

/**
 * @brief The CpeEmPluginUI enum 回调枚举
 */
enum CpeEmPluginUI
{
    CPE_PLUGIN_CHECK_VERSION = 1,
    CPE_PLUGIN_DOWNLOAD_FINISHED = 2,
    CPE_PLUGIN_REFRESH_LIST = 3,
};

enum CpeEmMainUI
{
    CPE_MAIN_VERSION_CHECK = 0,
    CPE_MAIN_UPDATE_MESSAGE = 1,
};

//event handler enum
enum CpeEmFiberHome
{
    CPE_FIBERHOME_BASEINFO_FIRST = 0,
    CPE_FIBERHOME_RECOGNIZE = 1,
    CPE_FIBERHOME_GETSESSIONID = 2,
    CPE_FIBERHOME_BASEINFO = 3,
    CPE_FIBERHOME_NETWORKINFO = 4,
    CPE_FIBERHOME_LOCKBAND = 5,
    CPE_FIBERHOME_LOCKCELL = 6,
    CPE_FIBERHOME_DOLOGIN = 7,
    CPE_FIBERHOME_AIRPLANE = 8,
    CPE_FIBERHOME_CELLLIST = 9,

    CPE_FIBERHOME_USER_POSTRETURN = 99,
    CPE_FIBERHOME_USER_LOGOUT = 999,
};

//event handler enum
enum CpeEmTozed
{
    CPE_TOZED_RECOGNIZE = 1,
    CPE_TOZED_LOGIN = 2,
    CPE_TOZED_RAT = 3,
    CPE_TOZED_CELLLOCK = 4,
    CPE_TOZED_BAND_LOCK = 5,
    CPE_TOZED_SIGNAL = 6,
    CPE_TOZED_TEMP = 7,
    CPE_TOZED_NEIGHBOR = 8,

    CPE_TOZED_USER_POSTRETURN = 99,
    CPE_TOZED_USER_LOGOUT = 999,
};

//event handler enum
enum CpeEmPINSU
{
    CPE_PINSU_RECOGNIZE = 1,
    CPE_PINSU_LOGIN = 2,
    CPE_PINSU_SIGNAL = 3,
    CPE_PINSU_LOGIN_INFO = 4,
    CPE_PINSU_BANDLOCK = 5,
    CPE_PINSU_RAT = 6,
    CPE_PINSU_CELLLOCK = 7,

    CPE_PINSU_USER_POSTRETURN = 99,
    CPE_PINSU_USER_LOGOUT = 999,
};

//event handler enum
enum CpeEmHUAWEI
{
    CPE_HUAWEI_RECOGNIZE = 1,
    CPE_HUAWEI_LOGINSTATE = 2,
    CPE_HUAWEI_GETTOKEN = 3,
    CPE_HUAWEI_CHALLENGELOGIN = 4,
    CPE_HUAWEI_AUTHLOGIN = 5,
    CPE_HUAWEI_GETLOGINTOKEN = 6,
    CPE_HUAWEI_NEWLOGIN = 7,
    CPE_HUAWEI_INFORMATION = 8,
    CPE_HUAWEI_ANTENNA = 9,
    CPE_HUAWEI_DATASWITCH = 10,
    CPE_HUAWEI_NETMODELIST = 11,
    CPE_HUAWEI_NETMODE = 12,
    CPE_HUAWEI_STATUS = 13,
    CPE_HUAWEI_TRAFFIC = 14,
    CPE_HUAWEI_PLMN = 15,
    CPE_HUAWEI_CELLINFO = 16,
    CPE_HUAWEI_SIGNAL = 17,
    CPE_HUAWEI_TRAFFICMONTH = 18,
    CPE_HUAWEI_LOCKFREQ = 19,
    CPE_HUAWEI_EXTANTENNA = 20,
    CPE_HUAWEI_EXTNRANTENNA = 21,

    CPE_HUAWEI_USER_POSTRETURN = 99,
    CPE_HUAWEI_USER_LOGOUT = 999,
};

#define LOG_INFO(X, Y) if(getInterface(LogUI)) getInterface(LogUI)->insertLog(CPE_LOG_INFO, X, QString::asprintf("File: %s\nLine: %d\nFunction: %s\nMsg: ", __FILE__, __LINE__, __FUNCTION__) + (Y))
#define LOG_DEBUG(X,Y) if(getInterface(LogUI)) getInterface(LogUI)->insertLog(CPE_LOG_DEBUG, X, QString::asprintf("File: %s\nLine: %d\nFunction: %s\nMsg: ", __FILE__, __LINE__, __FUNCTION__) + (Y))
#define LOG_WARNING(X,Y) if(getInterface(LogUI)) getInterface(LogUI)->insertLog(CPE_LOG_WARNING, X, QString::asprintf("File: %s\nLine: %d\nFunction: %s\nMsg: ", __FILE__, __LINE__, __FUNCTION__) + (Y))
#define LOG_ERROR(X,Y) if(getInterface(LogUI)) getInterface(LogUI)->insertLog(CPE_LOG_ERROR, X, QString::asprintf("File: %s\nLine: %d\nFunction: %s\nMsg: ", __FILE__, __LINE__, __FUNCTION__) + (Y))
#endif
